package com.ai4ai.laika.card;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping(value = "card")
public class CardController {

    @Autowired
    CardService cardService;

    @GetMapping(value = "fm")
    public ResponseEntity buildFile(){
        //cardService.createFile();

//        cardService.createApplicationFile();
//        cardService.createPomFile();
        //String rs = cardService.execCmdWithResult();
         cardService.execBatFile();
         String rs = "ok";
        return ResponseEntity.ok(rs);
    }


    //第一次启动时需要读取数据库配置，生成java代码，mvn打包，自动重启
    @GetMapping(value = "reboot")
    public ResponseEntity reboot(){



        return null;
    }
}
